<%@page import="Entity.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>实验室机房排课系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	<link rel="shortcut icon" type="image/x-icon" href="logo.jpg" />
	
	
	<%int rd=new Random().nextInt(2);
		if(rd==1){
		%>
		<link rel="stylesheet" href="css/login_background2.css" />
		<%
		}
		else{
	 %>
	<link rel="stylesheet" href="css/login_background1.css" />
	<%} %>
	<link rel="stylesheet" href="css/Login.css" />
	<link rel="stylesheet" href="css/ToolBar.css" />
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
	
  </head>
  
  <body>
  <%
			  	String error =(String) request.getAttribute("errorpsw");
			  	if(error!=null){
			  	%>
			  	<script type="text/javascript" language="javascript">
			  	alert("用户名或密码错误！");
			  	</script>
			  	<%
		  		request.setAttribute("errorpsw",null );
		  		}
%>
  <div class="all_p">
 <div style="padding-top:11%;"></div>
  <!--
  <div style="width:320px;height: 300px;display: block;margin:60px auto auto auto;">
	  <form class="form-horizontal" role="form" name="login" onsubmit="return validateForm()" method="post" action="LoginServlet">
		  <div class="form-group">
		    <label for="firstname" class="col-sm-2 control-label">工号</label>
		    <div class="col-sm-10">
		      <input type="text" style="width: 200px;" class="form-control"  name="stuNum" placeholder="请输入工号">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="lastname" class="col-sm-2 control-label">密码</label>
		    <div class="col-sm-10">
		      <input type="password" style="width: 200px;" class="form-control" name="psw" placeholder="请输入密码">
		    </div>
		  </div>
		  <div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">
		      <div class="checkbox">
		        <label>
		          <input type="checkbox">记住密码
		        </label>
		      </div>
		    </div>
		  </div>
		  <div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">
		      <button type="submit" class="btn btn-default">登录</button>
		    </div>
		  </div>
		</form>
		</div>
--> 

<div class="outline">

  	<form role="form" name="login" method="post" action="LoginServlet">
  		<div class="pic">
  			<div class="logo_n"></div>
  		</div>
   	 	<div class="login">
			<h2>用户登录</h2>
			<div class="login_box">
				<input type="text" required="required" name="stuNum" /><label>工号/学号</label>
			</div>
			<div class="login_box">
				<input type="password" required="required" name="psw" /><label>密码</label>
			</div>
			<a>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
				<input type="submit" value="登录">
			</a>
		</div>
	</form>
	</div>
</div>		
  </body>
</html>
